<?php

use yii\helpers\Html;
use yii\helpers\HtmlPurifier;
use common\widgets\DetailView;
use common\widgets\HelloWidget;
use yii\bootstrap\Modal;

/* @var $this yii\web\View */
/* @var $model backend\models\School */

$this->title = $model->ZWMC;
$this->params['breadcrumbs'][] = ['label' => 'Schools', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="school-view">
    <div class="panel">
        <div class="panel-heading">
            <?= HtmlPurifier::process($this->title) ?>
		    </div>
        <div class="panel-body">
            <div class="form-group" style="position: relative;">
                <?= Html::a('修改', ['update', 'id' => $model->ID], [
                    'class' => 'btn btn-primary btn-sm',
                    'style' => ['display' => $model->ZT == '待审核' ? 'none' : ''],
                ]) ?>
                <?= Html::a('提交审核', 'javascript:void(0);', [
                    'data-toggle' => 'modal',
                    'data-target' => '#create-modal',
                    'class' => 'btn btn-success btn-sm',
                    'style' => [
                        'display' => $model->ZT == '修改' ? '' : 'none',
                        'position' => 'absolute',
                        'right' => '0',
                        'top' => '0',
                    ],
                ]) ?>
            </div>
            <?= DetailView::widget([
                'model' => $model,
                'fieldRows' => [
                    [
                        '学校名称' => $model->ZWMC,
                        '学校代码' => $model->DM,
                    ],[
                        '英文名称' => $model->YWMC,
                        '学校类别' => $model->XXLB,
                    ],[
                        '属地教育部门名称' => $model->SDJYBMMC,
                        '属地教育部门代码' => $model->SDJYBMDM,
                    ],[
                        '主管类别' => $model->ZGLB,
                        '学校办别' => $model->XXBB,
                    ],[
                        '举办者名称' => $model->JBZMC,
                        '办学类别' => $model->BXLB,
                    ],[
                        '法人代表名称' => $model->FRDBMC,
                        '法人证书号' => $model->FRZSH,
                    ],[
                        '城市' => $model->CS,
                        '学校行政区划码' => $model->XZQHM,
                    ],[
                        '区/县' => $model->QX,
                        '地址代码' => $model->DZDM,
                    ],[
                        '地址' => $model->DZ,
                        '邮政编码' => $model->YZBM,
                    ],[
                        '所在地区类别' => $model->SZDQLB,
                        '驻地城乡类型' => $model->ZDCXLX,
                    ],[
                        '负责人姓名' => $model->FZRXM,
                        '负责人联系电话' => $model->FZRLXDH,
                    ],[
                        '校长姓名' => $model->XZXM,
                        '校长手机号码' => $model->XZSJH,
                    ],[
                        '学籍联系人' => $model->XJLXR,
                        '学籍联系电话' => $model->XJLXDH,
                    ],[
                        '招生咨询电话' => $model->ZSZXDH,
                        '招生咨询邮箱' => $model->ZSZXYX,
                    ],[
                        '联系电话' => $model->LXDH,
                        '独立设置少数民族学校' => $model->SSMZXX?'是':'否',
                    ],[
                        '传真电话' => $model->CZDH,
                        '附设班类型' => $model->FSBLX,
                    ],[
                        '电子信箱' => $model->DZXX,
                        '评估类型' => $model->PGLX,
                    ],[
                        '主页地址' => $model->ZYDZ,
                        '是否建立校园网' => $model->SFJLXYW?'是':'否',
                    ],[
                        // '建校年月:date' => $model->JXNY,
                        '建校年月' => $model->JXNY,
                        '状态' => $model->ZT,
                    ],[
                        '简介:3' => $model->JJ,
                    ],
                ],
            ]) ?>

            <?php Modal::begin([
                'id' => 'create-modal',
                'header' => '是否提交审核',
                'size' => 'modal-sm',
                'bodyOptions' => [
                  'class' => 'modal-body',
                  'style' => 'text-align: right',
                ]]) ?>
                    <?= Html::a('确定', ['verify', 'id' => $model->ID], ['class' => 'btn btn-primary']) ?>
                    <?= Html::button('取消', [
                        'class' => 'btn btn-default',
                        'data-dismiss' => 'modal',
                    ]) ?>
            <?php Modal::end() ?>
            <!-- <?= HelloWidget::widget() ?> -->
        </div>
    </div>
</div>
